package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.IRecruitmentDao;
import com.cn.wanxi.dao.impl.RecruitmentDaoImpl;
import com.cn.wanxi.model.OrdbyModel;
import com.cn.wanxi.model.RecruitmentModel;
import com.cn.wanxi.service.IRecruitmentService;

import java.util.List;

public class RecruitmentServiceImpl implements IRecruitmentService {
    @Override
    public List<RecruitmentModel> findAll() {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        List<RecruitmentModel> list=iRecruitmentDao.findAll();
        return list;
    }

    @Override
    public int deletebyid(int recruitmentId) {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.deleteById(recruitmentId);
    }

    @Override
    public int recruitmentAdd(RecruitmentModel recruitmentModel) {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.recruitmentAdd(recruitmentModel);
    }

    @Override
    public RecruitmentModel findById(int recruitmenIid) {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.recruitmentFindById(recruitmenIid);
    }

    @Override
    public int recruitmentUpdate(RecruitmentModel recruitmentModel) {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.recruitmentUpdate(recruitmentModel);
    }

    @Override
    public List<RecruitmentModel> findAllTh(RecruitmentModel recruitmentModel) {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.findTh(recruitmentModel);
    }

    @Override
    public int getCont(RecruitmentModel recruitmentModel) {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.getCont(recruitmentModel);
    }


    @Override
    public List<RecruitmentModel> recruitmentFind() {
        IRecruitmentDao iRecruitmentDao=new RecruitmentDaoImpl();
        return iRecruitmentDao.recruitmentFind();
    }
}
